using System.ComponentModel.DataAnnotations;

namespace B.S.NewMedical.Domain.User
{
    /// <summary>
    /// 用户权限关联实体模型
    /// </summary>
    public class UserPermissionModel : EntityModel
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Required]
        public int UserId { get; set; }

        /// <summary>
        /// 权限ID
        /// </summary>
        [Required]
        public int PermissionId { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; } = true;

        /// <summary>
        /// 导航属性 - 用户
        /// </summary>
        public virtual UserModel? User { get; set; }

        /// <summary>
        /// 导航属性 - 权限
        /// </summary>
        public virtual PermissionModel? Permission { get; set; }
    }
} 